package cn.accp.mvc.controller;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.accp.mvc.entity.Street;
import cn.accp.mvc.service.StreetService;

@Controller
@RequestMapping("/page")
public class StreetController {
	@Autowired
	private StreetService streetService;
	public void setStreetService(StreetService streetService) {
		this.streetService = streetService;
	}
	@RequestMapping("/getAllStreet")
	public String getAllTypes(HttpSession session){
		List<Street> streetList = new ArrayList<Street>();
		streetList = streetService.getAllStreet();
		session.setAttribute("streetList", streetList);
		
		return "/page/houseActionInfo.do";
	}
	
}
